package com.design.structure.composite.atguigu;

import java.util.HashMap;
import java.util.Map;

/**
 * @ProjectName: design
 * @Package: com.design.structure.composite.atguigu
 * @ClassName: Composite
 * @Author: shenaiguo
 * @Description:
 * @Date: 2020/9/7 0007 23:28
 */
public class Composite {
    public static void main(String[] args) {
        Map<Integer,String> hashMap =new HashMap<>();
        hashMap.put(0,"东游记");//直接存放叶子节点(node)
        HashMap<Integer,String> map =new HashMap<>();
        map.put(1,"西游记");
        map.put(2,"红楼梦");
        hashMap.putAll(map);
        System.out.println(hashMap);
    }
}
